package com.yunxi.service.localService.sys.impl;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.com.ToolMapper;
import com.yunxi.service.localService.sys.ToolService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ToolServiceImpl extends ServiceImplPlus<ToolMapper, T> implements ToolService {

    @Override
    public int exist6(Map<String, Object> map) {
        int num = baseMapper.exist6(map);
        return num;
    }

    @Override
    public int exist(String table_name, String col_key, String col_value, String where,String idName,String idValue) {
        Map<String,String> map = new HashMap();
        map.put("table_name",table_name);
        map.put("col_key",col_key);
        map.put("col_value",col_value);
        map.put("where",where);
        map.put("idName",idName);
        map.put("idValue",idValue);
        return baseMapper.exist(map);
    }

    public int exist2(String table_name, String col_key, String col_value,String col_key2,String col_value2,String where) {
        Map<String,String> map = new HashMap();
        map.put("table_name",table_name);
        map.put("col_key",col_key);
        map.put("col_value",col_value);
        map.put("col_key2",col_key2);
        map.put("col_value2",col_value2);
        map.put("where",where);
        return baseMapper.exist2(map);
    }

    @Override
    public List<HashMap> dict_list(String table_name, String dict_key, String dict_value,String where) {
        Map<String,String> map = new HashMap();
        map.put("table_name",table_name);
        map.put("dict_key",dict_key);
        map.put("dict_value",dict_value);
        map.put("where",where);
        return baseMapper.dict_list(map);
    }
}
